package com.mfangsoft.zhuangjialong.article.controller;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.CrossOrigin;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.ResponseBody;

import com.mfangsoft.zhuangjialong.article.model.ArticleDetailModel;
import com.mfangsoft.zhuangjialong.article.model.ArticleEntity;
import com.mfangsoft.zhuangjialong.article.service.ServerArticleService;
import com.mfangsoft.zhuangjialong.common.model.ResponseMessage;

@Controller(value="AppArticle")
@RequestMapping("/app")
public class AppArticleController {
	@Autowired
	private ServerArticleService serverArticleServiceImpl;
	
	@RequestMapping(value = "/queryarticledetails", method = RequestMethod.POST)
	@ResponseBody
	@CrossOrigin
	public ResponseMessage<ArticleDetailModel> queryArticleDetails(@RequestBody ArticleDetailModel param){
		ResponseMessage<ArticleDetailModel> responseMessage=new ResponseMessage<>();
		responseMessage.setCode("0");
		responseMessage.setMessage("获取成功");
		responseMessage.setResult(serverArticleServiceImpl.queryArticleDetails(param));
		return responseMessage;
	}
}
